package com.macro.mall.portal.feign;

import com.macro.mall.common.api.CommonResult;
import com.macro.mall.common.api.SearchResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author：Minxiao-Hao
 * @Description:
 * @name：EsDocFeign
 * @Date：2024/10/25 10:27
 */
@FeignClient("mall-es")
public interface EsDocFeign {
    /**
     * 根据拼音查询
     *
     * @param searchResult 用户输入的搜索结果
     * @return 匹配的字符串列表
     */
    @PostMapping("/doc/search/pinyin")
    public CommonResult<List<String>> searchByPinyin(@RequestBody SearchResult searchResult);
}
